% MergeSort-RecursionTree
% Manuel Kirsch
\documentclass[a4paper,landscape]{scrartcl}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
%\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>

\begin{comment}
:Title:  Merge sort recursion tree

\end{comment}
\usepackage{fancybox}
\usepackage{tikz}

\title{MergeSort-RecursionTree}
\author{Manuel Kirsch}
\date{}
\begin{document}
\begin{preview}

\input{styles.tex}



\begin{tikzpicture}[level/.style={sibling distance=40mm/#1}]
\node [circle, normal] (z){$x_1$}
    child {
        node [circle, draw, normal] (a) {$x_2$}
        edge from parent [normal]
        node[left] {$ 0 $}
  }
  child {node [circle,draw,normal] (j) {$x_2$}
        child {
            node [circle,draw,normal] (k) {$x_3$}
            child {
                 node {$\vdots$}
                 edge from parent
                node[left] {$ 0 $}
            }
            edge from parent
            node[left] {$ 0 $}
        }
        child {node [circle,draw,normal] (l) {$x_3$}
            child {
                node [circle,draw,normal] {$x_4$}
                 child {
                	node {$\vdots$}
	               edge from parent
        	       node[left] {$ 0 $}
                }
                child {
                	node {$\vdots$}
	                edge from parent
        	        node[right] {$ 1 $}
                }
                edge from parent
                node[left] {$ 0 $}
            }
            child {
                node (c){$\vdots$}
                edge from parent
                node[right] {$ 1 $}
            }
            edge from parent
            node[right] {$ 1 $}
        }
        edge from parent
        node[right] {$ 1 $}
  };

\end{tikzpicture}
\end{preview}
\end{document}
